package cn.iocoder.yudao.module.ad.effect.controller.admin;

import cn.iocoder.yudao.framework.business.basic.controller.PageController;
import cn.iocoder.yudao.framework.business.basic.controller.SimpleDetailController;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.ad.effect.service.AdminAdEffectRecordService;
import cn.iocoder.yudao.module.ad.effect.vo.AdminAdEffectRecordQueryDTO;
import cn.iocoder.yudao.module.ad.effect.vo.AdminAdEffectRecordVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "管理后台 - 广告效果记录")
@RestController
@RequestMapping("/ad/effect/record")
@Validated
public class AdEffectRecordController implements SimpleDetailController<AdminAdEffectRecordVO>, PageController<AdminAdEffectRecordVO, AdminAdEffectRecordQueryDTO> {
    @Resource
    private AdminAdEffectRecordService appAdEffectRecordService;

    @Override
    public CommonResult<AdminAdEffectRecordVO> getDetail(Long id) {
        return success(appAdEffectRecordService.getDetail(id));
    }

    @Override
    public CommonResult<PageResult<AdminAdEffectRecordVO>> getPage(Integer pageNo, Integer pageSize, AdminAdEffectRecordQueryDTO param) {
        return success(appAdEffectRecordService.getPage(pageNo, pageSize, param));
    }

}